package com.ruoyi.common.enums;

/**
 * @author zengqingfa
 * @date 2019/10/21 18:04
 * @description
 * @email zengqingfa_java@163.com
 */
public enum StateEnum {

    SUCCESS(200, "请求成功"),
    BAD_REQUEST(400, "请求不完整"),
    NOT_IMPLEMENTED_REQUEST(501, "请求未实现或未开启"),

    UNAVAILABLE_GATEWAY(50001, "网关超时"),
    UNAVAILABLE_SERVICE(50002, "服务不可用"),

    ILLEGAL_REQUEST(6010101, "非法请求"),
    ILLEGAL_IP(6010102, "IP被禁止"),

    ERROR_PERSON(6090002, "人员信息异常"),
    ERROR_PERSON_DATA(6090004, "人员信息数据错误异常"),
    ERROR_PERSON_STATUS(6140601, "状态异常"),

    ERROR_ROLE(6090002, "角色信息异常"),
    ERROR_ROLE_DATA(6090004, "角色信息数据错误异常"),
    ERROR_ROLE_STATUS(6140601, "角色状态异常")

    , ERROR_BPMN(6050000, "流程异常")
	, ERROR_BPMN_DEFINITION(6050100, "流程定义异常")
	, ERROR_BPMN_INSTANCE(6050200, "流程实例异常")
	, ERROR_BPMN_TASK(6050300, "流程任务异常")
	, ERROR_BPMN_MONITOR(6050400, "流程监控异常")
	, ERROR_BPMN_STATISTICS(6050500, "流程统计异常");

    private int code;
    private String text;

    private StateEnum(int code) {
        this.code = code;
        this.text = "" + code;
    }

    private StateEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

}

